package org.focusj.scala.fn

object ApplyCurry {
    //对比两个例子
    def mul(x: Int, y: Int) = x * y
    //功能一样的函数被柯里化之后
    def mul2(x: Int) = (y: Int) => x * y
    //scala中支持的柯里化
    def mul3(x: Int)(y: Int) = x * y

    def eq(a: Array[String], b: Array[String]) = {
        a.corresponds(b)(_.equalsIgnoreCase(_))
    }

    def main(args: Array[String]) {
        println(mul(10, 10))
        println(mul2(10)(10))
    }
}